package cn.wolfcode.domain;

import com.alibaba.fastjson.JSON;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;

@Setter
@Getter
public class CourseOrder {
    private Long id;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date inputTime;

    private Customer customer;

    private Classinfo classinfo;

    private BigDecimal money;

    public String getJson(){
        HashMap map = new HashMap() ;
        map.put("id",id );
        map.put("inputTime",inputTime );
        map.put("customerId",customer.getId() );
        map.put("classinfoId",classinfo.getId());
        map.put("money",money);
        return JSON.toJSONString(map);
    }

}